package org.example.controller;

import org.example.User;
import org.example.bean.Store;
import org.example.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/user")
    public User getUser(){
        return orderService.getUser();
    }

    @GetMapping("/getUserStream")
    public void getUserStream(){
        orderService.getUserStream();
    }

    @GetMapping("/store")
    public Store getStore(){
        return orderService.getStore();
    }

    @GetMapping("/getStoreServerStream")
    public void getStoreServerStream(){
        orderService.getStoreServerStream();
    }

    @GetMapping("/getStoreClientStream")
    public void getStoreClientStream(){
        orderService.getStoreClientStream();
    }
}
